﻿Public Class InsertSqlPersonalCommand
    Inherits PersonalCommand

    Private mCmd As System.Data.Common.DbCommand

    Public Sub New(ByVal cmd As System.Data.Common.DbCommand)
        mCmd = cmd
    End Sub

    Public Overrides Sub procesar(ByVal p As Personal)
        mCmd.CommandText = "insert into Personal values (" & _
            "'" & p.dni & "'," & _
            "'" & p.nombre & "'," & _
            "'" & p.ap_pat & "'," & _
            "'" & p.ap_mat & "'," & _
            "'" & p.cargo.codigo & "'," & _
            "'" & p.odei & "'," & _
            "'" & p.dpto & "'," & _
            "'" & p.usuario & "'," & _
            "'" & p.clave & "'," & _
            "'" & p.fecha_nac & "')"

        'MsgBox(cmd.CommandText)
        mCmd.ExecuteNonQuery()
    End Sub
End Class
